RE: [SQL] datediff function - Mailing list pgsql-sql

From Herouth Maoz
Subject RE: [SQL] datediff function
Date
Msg-id l03130302b3df13be6b8f@[147.233.159.109]
Whole thread Raw
In response to RE: [SQL] datediff function  ("Pham, Thinh" <tpham@mail.priority.net>)
List pgsql-sql
At 16:18 +0300 on 17/08/1999, Pham, Thinh wrote:


> What happen if i just want to compare using minute only or hour only instead
> of day? Is there a function to do that or is postgres only work in day?

No problem, just write 'now'::datetime - '6 hours'::timespan. Or some such.
Please read about the datetime and timespan types in the user guide.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




pgsql-sql by date:

Previous
From: "Pham, Thinh"
Date:
Subject: RE: [SQL] datediff function
Next
From: Tom Lane
Date:
Subject: Re: [SQL] datediff function